package day013.homework.p3;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入姓名：");
        String name = sc.nextLine();
        System.out.println("请输入年龄：");
        String age = sc.nextLine();
        System.out.println("请输入身高：");
        String height = sc.nextLine();
        System.out.println("是否结婚？");
        String married = sc.nextLine();
        System.out.println("请输入性别：");
        String gender = sc.nextLine();

        Student s = new Student();
        s.setName(name);
        s.setAge(Integer.parseInt(age));
        s.setHeight(Double.parseDouble(height));
        s.setMarried(Boolean.parseBoolean(married));
        if (gender.equals("男")) {
            s.setGender('F');
        } else {
            s.setGender('M');
        }

        System.out.println(s);
    }
}
